* Multiproduct Firms, Horizontal Mergers, and International Trade
* Jackie M.L. Chan, Michael Irlacher, and Michael Koch

* This do file runs additional regressions for export market outcomes.

* Main data
use "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\data\regression_data_export_figureA13ab.dta", clear

* Figure A.13(a),(b)
foreach x in lnnmark lnnprod {
did_imputation `x' group_cvrnr aarA aar3 if minemployee_cvrnr>=5 & _mergedist==3, fe(group_cvrnr aarA) hor(0/2) pretrend(4) tol(0.0001) maxit(250) autosample cluster(ind)
outreg2 using "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\output\table_figureA13.txt", bdec(4) sdec(4) nocons nonotes 
}

foreach x in lnnprodpermark {	
did_imputation `x' group_cvrnr aarA aar3 if minemployee_cvrnr>=5 & ((acquirer==1 & max_merge==3) | acquirer==0) & _mergedist==3, fe(group_cvrnr aarA) hor(0/2) pretrend(4) tol(0.0001) maxit(250) autosample cluster(ind)
outreg2 using "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\output\table_figureA13.txt", bdec(4) sdec(4) nocons nonotes 
}

foreach x in p90_ldistw{
did_imputation `x' group_cvrnr aarA aar3 if minemployee_cvrnr>=5 & _mergedist==3, fe(group_cvrnr aarA) hor(0/2) pretrend(4) tol(0.0001) maxit(250) autosample cluster(ind)
outreg2 using "D:\Data\Workdata\703989\FJSJ3989\CIK\replication_restat\output\table_figureA13.txt", bdec(4) sdec(4) nocons nonotes 
}